package com.test.daily.leetcode.y2022.m06.day0621.v02;

import sun.font.FontRunIterator;

/**
 * @author Tom on 2022/6/21
 */
public class Solution {
    public static void main(String[] args) {

    }
    public String defangIPaddr(String address) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < address.length(); i++) {
            if(address.charAt(i) != '.'){
                builder.append(address.charAt(i));
            }else {
                builder.append("[.]");
            }
        }
        return builder.toString();
    }
}
